<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>在线OJ平台-题目列表</title>
    <style>
        /* 起手式, 100%保证我们的样式设置可以不受默认影响 */
        * {
            /* 消除网页的默认外边距 */
            margin: 0px;
            /* 消除网页的默认内边距 */
            padding: 0px;
            box-sizing: border-box;
        }

        html,
        body {
            width: 100%;
            height: 100%;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background-color: #f5f5f5;
        }

        .container .navbar {
            width: 100%;
            height: 60px;
            background-color: #2c3e50;
            /* 给父级标签设置overflow，取消后续float带来的影响 */
            overflow: hidden;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        }

        .container .navbar a {
            /* 设置a标签是行内块元素，允许你设置宽度 */
            display: inline-block;
            /* 设置a标签的宽度,a标签默认行内元素，无法设置宽度 */
            width: 100px;
            /* 设置字体颜色 */
            color: #ecf0f1;
            /* 设置字体的大小 */
            font-size: 16px;
            /* 设置文字的高度和导航栏一样的高度 */
            line-height: 60px;
            /* 去掉a标签的下划线 */
            text-decoration: none;
            /* 设置a标签中的文字居中 */
            text-align: center;
            transition: background-color 0.3s ease;
        }

        /* 设置鼠标事件 */
        .container .navbar a:hover {
            background-color: #34495e;
        }

        .container .navbar .login {
            float: right;
        }

        .container .question_list {
            padding-top: 50px;
            width: 800px;
            height: 100%;
            margin: 0px auto;
            text-align: center;
        }

        .container .question_list table {
            width: 100%;
            font-size: 16px;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            margin-top: 30px;
            background-color: white;
            border-collapse: collapse;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
            border-radius: 8px;
            overflow: hidden;
        }

        .container .question_list h1 {
            color: #2c3e50;
            font-size: 32px;
            margin-bottom: 20px;
        }

        .container .question_list table th,
        .container .question_list table td {
            padding: 15px;
            text-align: center;
        }

        .container .question_list table th {
            background-color: #34495e;
            color: white;
            font-weight: bold;
        }

        .container .question_list table tr:nth-child(even) {
            background-color: #f8f9fa;
        }

        .container .question_list table tr:hover {
            background-color: #e9ecef;
        }

        .container .question_list table .item a {
            text-decoration: none;
            color: #2c3e50;
            transition: color 0.3s ease;
        }

        .container .question_list table .item a:hover {
            color: #3498db;
            text-decoration: underline;
        }

        .container .footer {
            width: 100%;
            height: 60px;
            text-align: center;
            line-height: 60px;
            color: #7f8c8d;
            margin-top: 30px;
            background-color: #ecf0f1;
            box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
        }

        .container .footer h4 {
            font-size: 14px;
            font-weight: normal;
        }
    </style>
</head>

<body>
    <div class="container">
        <!-- 导航栏， 功能不实现-->
        <div class="navbar">
            <a href="/">首页</a>
            <a href="/All_Questions">题库</a>
            <a href="/">竞赛</a>
            <a href="/">讨论</a>
            <a href="/">求职</a>
            <a class="login" href="#">登录</a>
        </div>
        <div class="question_list">
            <h1>在线OJ题目列表</h1>
            <table>
                <tr>
                    <th class="item">编号</th>
                    <th class="item">标题</th>
                    <th class="item">难度</th>
                </tr>
                {{#OneQuestionList}}
                <tr>
                    <td class="item">{{number}}</td>
                    <td class="item"><a href="/Question/{{number}}">{{title}}</a></td>
                    <td class="item">{{star}}</td>
                </tr>
                {{/OneQuestionList}}
            </table>
        </div>
        <div class="footer">
            <h4>@小镇敲码人</h4>
        </div>
    </div>
</body>

</html>